package com.wf.classRoomTest;

/**
 * @author mpk
 * @since 2024/6/6 10:33:04
 */
public class DiguiTest {

    public static void main(String[] args) {


        System.out.println(sum(100));
        System.out.println(Multiplication(20));
    }

    public  static int sum(int n)
    {
        if(n==1)
        {
            return 1;
        }
        else
        {

        return sum(n-1)+n;
        }
    }



    public  static int Multiplication(int n)
    {

        if(n==1)
        {
            return 1;
        }
        else
        {
            return  Multiplication(n-1)*n;
        }
    }
}
